package com.bsoft.gol.hcs.specialist.service;

import ctd.controller.exception.ControllerException;
import ctd.util.annotation.RpcService;
import com.bsoft.gol.hcs.specialist.bean.request.PatientSearchRuleRequest;
import com.bsoft.gol.hcs.specialist.bean.request.SaveOrSearchRequest;
import com.bsoft.gol.hcs.specialist.bean.response.GetDetailResponse;
import com.bsoft.gol.hcs.specialist.bean.response.ListPatientSearchRuleResponse;
import com.bsoft.gol.hcs.specialist.bean.response.ListSubscribeResponse;
import com.bsoft.gol.hcs.specialist.bean.response.SaveOrSearchResponse;

import java.util.List;
import java.util.Map;

/**
 * @author lixy
 * @date 2021/8/8 15:21
 */
public interface PrsSearchRuleService {

    /**
     * 查询常用的患者检索规则列表
     * @return baseResponse
     */
    @RpcService
    List<ListPatientSearchRuleResponse> listPatientSearchRule(PatientSearchRuleRequest request) throws ControllerException;

    /**
     * 获取历史检索记录（包含分页）
     * @param request
     * @return
     * @throws ControllerException
     */
    @RpcService
    Map<String, Object> listHistoryPatientSearchRule(PatientSearchRuleRequest request) throws ControllerException;

    /**
     * 患者检索规则订阅状态修改
     * @param request req
     * @return res
     */
    @RpcService
    void updateSubscribeStatus(PatientSearchRuleRequest request) throws ControllerException;

    /**
     * 查询患者检索规则详情
     * @param patientSearchRuleId id
     * @return detail
     */
    @RpcService
    GetDetailResponse getDetail(Long patientSearchRuleId) throws ControllerException;

    /**
     * 保存患者检索规则/手动执行规则进行检索
     *
     * @param request req
     * @return base
     */
    @RpcService
    SaveOrSearchResponse saveOrSearch(SaveOrSearchRequest request) throws ControllerException;

    /**
     *
     * 查询病历订阅列表
     * @param userId userId
     * @return list
     */
    @RpcService
    List<ListSubscribeResponse> listSubscribe(String userId) throws ControllerException;


    /**
     * 删除病历订阅信息
     * @param patientSearchRuleId id
     * @return detail
     */
    @RpcService
    void deleteSearchRule(Long patientSearchRuleId) throws ControllerException;



}
